/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller.errormanager;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author Wahyu Fahmy
 */
public class TestingRegex {
    public static void main(String[] args) {
        
//        // testing regex [works]
        String input = "191087F*10810";
        Pattern p = Pattern.compile("(F\\*)");
        Matcher m = p.matcher(input);
        if (m.find()){
            System.out.println(input + " is true");
        } else {
            System.err.println(input + " is false");
        }
        
//        String input = "wahyu fahmy      		wisudawan test	cut";
//        String[] temp = input.split("\\s+");
//        for(int i =0 ; i<temp.length ; i++){
//            System.out.println("String-" + temp[i] + " ");
//        }
//        System.out.println("");
        
          //doesn't works
//        String input = "gg---";
//        String regex1 = "-{3}";
//        if (input.matches(regex1)){
//            System.out.println(input + " is true");
//        } else {
//            System.err.println(input + " is false");
//        }
//        System.out.println(input.matches(regex1));
//        
          //works
//        Pattern p = Pattern.compile("-{3}");
//        Matcher m = p.matcher(input);
//        if (m.find()){
//            System.out.println(input + " is true");
//        } else {
//            System.err.println(input + " is false");
//        }
    }
}
